package com.huatai.bpmn.entity.vo;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * 分页公共类
 * @author :yxy
 * @date : 2023/8/2
 */
public class PageVo {
	private String businessKey;
	private String place;
	private String pgIndex="0";
	private String pgSize="10";

	public static IPage getiPage(int pgIndex, int pgSize, List<JSONObject> count, List<JSONObject> list) {
		IPage page=new Page();
		page.setTotal(count.size());
		page.setCurrent(Long.valueOf(pgIndex));
		page.setSize(Long.valueOf(pgSize));
		page.setRecords(list);
		return page;
	}
}
